<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" language="javascript" src="../js/jscript_ebayhelper.js"></script>
        <script type="text/javascript" language="javascript" src="../../external/js/jquery-1.7.1.js"></script>
        <style type="text/css">
            body{min-height: 0px; min-width: 0px}
            #opacityTest{

                height: 100px;
                border-bottom: 3px solid black;
                background: green;
                color: red;
                overflow: hidden;
                min-height: 0px; min-width: 0px
            }

        </style>
        <style type="text/css">
            #opacityTest2{
                filter:alpha(opacity=10);
                zoom: 1;
                opacity: 0.1;
                width: 200px; height: 100px; background: #000;
                color: white;
                position: absolute;
                left: 0;
                top: 0
            }
            .tt33{
                filter:alpha(opacity=90);
                zoom: 1;
                opacity: 0.9;
                width: 200px; height: 100px; background: #000;
                color: white;
                position: absolute;
                left: 0;
                top: 0
            }
            body{
            }
        </style>
    </head>
    <body>
        <script>
            //            e$.addEventListener("ajaxbridgeready", function(){e$.println('ajax bridge is ready')});
            //            e$.addEventListener('ajaxbridgeready', function(){
            //                var flash = e$.getFlash('hyEbayAjaxBridge');
            //                flash.ajax('http://www.happyfashion.com.au/externalfile/sampleJSON.json',"loadjson");
            //            });
        </script>
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                id="hyEbayAjaxBridge" width="1" height="0"
                codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
            <param name="movie" value="http://www.happyfashion.com.au/externalfile/hyEbayAjaxBridge.swf" />
            <param name="quality" value="high" />
            <param name="bgcolor" value="#eeeeee" />
            <param name="allowScriptAccess" value="always" />
            <embed src="http://www.happyfashion.com.au/externalfile/hyEbayAjaxBridge.swf" quality="high" bgcolor="#869ca7"
                   width="1" height="0" name="hyEbayAjaxBridge" align="middle"
                   play="true"
                   loop="false"
                   quality="high"
                   allowScriptAccess="always"
                   type="application/x-shockwave-flash"
                   pluginspage="http://www.adobe.com/go/getflashplayer">
            </embed>
        </object>
        <div id="hyOutput" style="border: 1px solid black">Console:<br></div>
        <button id="btn1" onclick="pause()">click me</button><button id='btn2' onclick ="doit()">do it</button><button onclick="start()">resume</button><button onclick="toggle()">toggle</button>
        <button onclick="clear1()">clear</button><button onclick="stop1()">stop1</button><button onclick="stop2()">stop2</button>
        <div id="opacityTest">s<br>df<br>sdf<br>sd<br><br>f dd</div>
        <script type="text/javascript" language="javascript">
            e$.println(parseFloat('10.6px')/5,parseInt('33.5px')/5);
            var opt = e$.getById('opacityTest');
            e$.getcsstest(opt);
            var btn2 = e$.getById('btn2');
            var pause = function(){
                e$.pauseAnimation(btn2);
            }
            var start = function(){
                e$.resumeAnimation(btn2);
            }
            var toggle = function(){
                e$.toggleAnimation(btn2);
            }
            var clear1 = function(){
                e$.clearAnimation(btn2);
            }
            var stop1 = function(){
                e$.stopAnimation(btn2, true);
            }
            var stop2 = function(){
                e$.stopAnimation(btn2);
            }
            var doit = function(){
                //e$.animation(opt, {height:200,width:500,opacity:0}, 1000,null,1000);
                e$.animation(opt, {height:0,width:100,opacity:1}, 1000,null,500); 
                //e$.animation(e$.getById('btn2'), {width:100,height:100,left:-10,top:-20}, 4000,function(){e$.println('btn anim 1 finish!')},500);
                //e$.animation(e$.getById('btn2'), {width:80,height:25,left:100,top:200}, 5000,function(){e$.println('btn anim 2 finish!')},500);
            }
            e$.println(btn2.clientWidth+":"+btn2.offsetWidth+":"+e$.getStyle(btn2, 'width')+":"+e$.width(btn2));
            var loadjson = function(obj){
                if(typeof obj ==='object'){
                    for(var name in obj){
                        e$.println(name +":"+ obj[name]);
                    }
                }else{
                    e$.println(obj);
                }
                
            }

        </script>
        <div class="measure1"></div><div class="measure2"></div>
        <div class="box">
            fff
            <div class="boxInner">
                ggg
            </div>
        </div>
        <button onclick="setBox3()">set box 300</button>
        <button onclick="setBox0()">set box 0</button>
        <button onclick="setBox1()">set box 1</button>
    <style>
        .box{
            background:green;
            overflow: hidden;
            padding: 7px;
            border: 5px solid black;
        }
        .measure1{width:200px; height: 10px; background: green; margin: 0; padding: 0}
        .measure2{width:250px; height: 10px; background: #333}
        .boxInner{
             height:100px;
            background:red;
        }
    </style>
    <script>
        var box = e$.getByClass('box')[0];
        e$.println(box.clientWidth,box.offsetWidth,e$.getComCss(box, 'width'),box.style.width);
        e$.println(box.style.padding, e$.getComCss(box, 'padding'));
        e$.println(box.style.border, e$.getComCss(box, 'border-right-width'));
        function setBox3(){
            // box.style['width'] = '300px';
            var full = box.clientWidth + e$.bw(box);
            var full2 = box.clientHeight + e$.bh(box);
            e$.println(e$.pw(box)+":"+e$.bw(box)+":"+e$.innerWidth(box)+":"+full+":"+box.offsetWidth);
            e$.println(e$.ph(box)+":"+e$.bh(box)+":"+e$.innerHeight(box)+":"+full2+":"+box.offsetHeight);
            e$.println(box.clientWidth,box.offsetWidth,e$.getComCss(box, 'width'),box.style.width);
        }
        function setBox0(){
            e$.println(box.clientHeight+":"+box.offsetHeight+":"+e$.getComCss(box, 'height'));
            e$.animation(box, {height:0,width:0}, 1000,function(obj){e$.println(box.clientHeight+":"+box.offsetHeight+":"+e$.getComCss(box, 'height'));});
        }
        function setBox1(){
            e$.animation(box, {height:200,width:300}, 1000);
        }
        e$.println(parseInt('auto'));
        var reg = /c[a-z]d/ig;
        var reg2 = new RegExp('ccc');
       
        var str='dscsd.sifiCsd.llsdfiCCdl;sfkdCsd';
        e$.println(str);
        e$.println(str.match(reg));
        e$.println(e$.repl(str, reg, function(s){return s.toLowerCase();}));
        e$.println(e$.cssItoM('border'));
        e$.println(e$.cssItoM('borderWidth'));
        e$.println(e$.cssItoM('borderWidthColor'));
        e$.println(e$.cssItoM('borderWidthThisIs'));
        e$.println(e$.cssMtoI('border-color-aa'));
        e$.println(e$.cssMtoI('border'));
        e$.println(e$.cssMtoI('border-idth'));
        e$.println(e$.cssMtoI('border-eidth-This-is-p-b'));
        var tt = e$.getById('classtest');
        e$.println(tt.className);
        e$.deleteClassName(tt, 'class2');
        e$.println(tt.className);
        e$.println("class1 class2 class3 class2".match(/class2/g));
        e$.println(e$.repl("class1 class2 class3 class2", /class2/g, ""))
    </script>
</body>
</html>
